#ifndef SUBMARINE_ENERGY_CALCULATOR_H
#define SUBMARINE_ENERGY_CALCULATOR_H

#include "algohub_export.h"

#define _USE_MATH_DEFINES // For M_PI
#pragma warning(disable: 4819) // Disable warning for characters not representable in current code page

#include <vector>
#include <cmath> // For std::cos, std::sin, std::atan2, std::sqrt, M_PI

// Waypoint information structure
struct Waypoint {
    double latitude;  // Latitude
    double longitude; // Longitude
    double depth;     // Depth (meters)
    double speed;     // Own speed (m/s)
    double heading;   // Heading (degrees, 0-360, North-East)
    double time;      // Time (seconds, relative to start)
};

// Ocean current information structure
struct OceanCurrent {
    double uo;        // Ocean current east_speed (m/s)
    double vo;        // Ocean current north_speed (m/s)
};

// Calculates total energy cost for the entire path
// Parameters:
//   waypoints: List of waypoints
//   currents: List of corresponding ocean current information (one-to-one with waypoints)
// Returns:
//   Total energy cost (Joules)
ALGOHUB_EXPORT double calculateTotalEnergyCost(const std::vector<Waypoint>& waypoints, const std::vector<OceanCurrent>& currents);

#endif // SUBMARINE_ENERGY_CALCULATOR_H